// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.linqingying.gitcode.pullrequest.data.service

import com.linqingying.gitcode.api.data.GCRepositoryPermissionLevel
import com.linqingying.gitcode.api.data.GCUser
import com.linqingying.gitcode.api.data.GitCodeUser
import com.linqingying.gitcode.authentication.accounts.GitCodeAccount

interface GCPRSecurityService {
  val ghostUser: GCUser
  val account: GitCodeAccount
  val currentUser: GCUser

  fun isCurrentUser(user: GitCodeUser): Boolean

  fun currentUserHasPermissionLevel(level: GCRepositoryPermissionLevel): Boolean

  fun isMergeAllowed(): Boolean
  fun isRebaseMergeAllowed(): Boolean
  fun isSquashMergeAllowed(): Boolean

  fun isMergeForbiddenForProject(): Boolean
}
